///////////////////////////////////////
//    Autor: Mato Kormuth              //
//    (C) Mato Programs 2011        //
//////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;

namespace MatoPrograms.Time
{
    public struct Time
    {
        //Private members
        int seconds;
        int minutes;
        int hours;
        //Public properties
        public int Seconds
        {
            get
            {
                return seconds;
            }
            set
            {
                seconds = value;
            }
        }
        public int Minutes
        {
            get
            {
                return minutes;
            }
            set
            {
                minutes = value;
            }
        }
        public int Hours
        {
            get
            {
                return hours;
            }
            set
            {
                hours = value;
            }
        }
        //Voids
        public Time ReturnTime(int seconds)
        {
            int i = seconds;
            int min = 0;
            int hour = 0;
            int sec = 0;
            while (i >= 60)
            {
                min += 1;
                i -= 60;
                if (min == 60)
                {
                    hour += 1;
                    min -= 60;
                }
                else
                {

                }
            }
            //zvysok
            sec = i;
            //vysup
            Time output = new Time();
            output.Hours = hour;
            output.Minutes = min;
            output.Seconds = sec;
            //return
            return output;
        }
        //public string MakeTimeFormat(Time)
        //{

        //}
    }
}
